<template>
	<view class="moment">
		<view class="top-info">
			<view class="moment-title">来看看萌宠吧</view>
			<view class="moment-desc">
				<text>第一次来到养宠的地方，很不错</text>
			</view>
			<view class="line"></view>
			<view class="pohtolist">
				<view v-for="(item,index) in photoList" :key="index" class="item">
					<image class="img" :src="item" mode="aspectFill" @click="checkBigIma(index)"></image>
				</view>
				<view class="fadeEle item"></view>
			</view>
			<view class="publish-time">2023-04-05</view>
		</view>
		<interace-btn></interace-btn>
		<!-- <comment-info :id="id"></comment-info> -->
	</view>
</template>

<script>
	import interaceBtn from '@/components/interractBtn/interaceBtn.vue'
	import commentInfo from '@/components/comment/commentInfo.vue'
	export default {
		components: {
			interaceBtn,
			commentInfo
		},
		data() {
			return {
			}
		},
		props: {
			photoList: {
				type: Array,
				default: []
			}
		},
		methods: {
			checkBigIma(index) {
				uni.previewImage({
					urls: this.photoList,
					current: index,
					success: () =>{},
					fail: () => {},
					complete: () => {},
			})
		}
	}
}
</script>

<style>
	.top-info {
		margin-top: 20px;
		margin-bottom: 40rpx;
	}
	
	.top-info .moment-title {
		font-size: 20px;
		margin-top: 10rpx;
		color: #000;
		font-weight: 600;
	}
	
	.top-info .moment-desc {
		margin-top: 10px;
		margin-bottom: 20rpx;
	}
	
	.top-info .line {
		width: 400rpx;
		height: 1px;
		margin: 60rpx auto 40rpx;
		background-image: linear-gradient(to right,rgba(238,216,174,.1),rgba(238,169,184,.1),rgba(238,216,174,.1));
	}
	
	.top-info .pohtolist {
		display: flex;
		flex-wrap: wrap;   
		justify-content: space-between;
		align-content: space-between;
		width: 100%;
	}
	
	.top-info .pohtolist .item {
		width: 231rpx;
		height: 231rpx;
		margin-bottom: 6rpx;
		border-radius: 6rpx;
		overflow: hidden;
	}
	
	.top-info .pohtolist .fadeEle {
		height: 0;
	}
	
	.top-info .pohtolist .item .img {
		width: 100%;
		height: 100%;
	}
	
	.top-info .publish-time {
		margin-top: 5px;
		color: #c4c4c4;
		font-size: 12px;
	}
</style>